3.451 \(\int \sqrt{a+\frac{c}{x^2}+\frac{b}{x}} \, dx\)

Optimal. Leaf size=105 \[ x \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}+\frac{b \tanh ^{-1}\left (\frac{2 a+\frac{b}{x}}{2 \sqrt{a} \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}}\right )}{2 \sqrt{a}}-\sqrt{c} \tanh ^{-1}\left (\frac{b+\frac{2 c}{x}}{2 \sqrt{c} \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}}\right ) \]

[Out]

Sqrt[a + c/x^2 + b/x]*x + (b*ArcTanh[(2*a + b/x)/(2*Sqrt[a]*Sqrt[a + c/x^2 + b/x
])])/(2*Sqrt[a]) - Sqrt[c]*ArcTanh[(b + (2*c)/x)/(2*Sqrt[c]*Sqrt[a + c/x^2 + b/x
])]

_______________________________________________________________________________________

Rubi [A]  time = 0.216392, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375 \[ x \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}+\frac{b \tanh ^{-1}\left (\frac{2 a+\frac{b}{x}}{2 \sqrt{a} \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}}\right )}{2 \sqrt{a}}-\sqrt{c} \tanh ^{-1}\left (\frac{b+\frac{2 c}{x}}{2 \sqrt{c} \sqrt{a+\frac{b}{x}+\frac{c}{x^2}}}\right ) \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[a + c/x^2 + b/x],x]

[Out]

Sqrt[a + c/x^2 + b/x]*x + (b*ArcTanh[(2*a + b/x)/(2*Sqrt[a]*Sqrt[a + c/x^2 + b/x
])])/(2*Sqrt[a]) - Sqrt[c]*ArcTanh[(b + (2*c)/x)/(2*Sqrt[c]*Sqrt[a + c/x^2 + b/x
])]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 22.4312, size = 85, normalized size = 0.81 \[ - \sqrt{c} \operatorname{atanh}{\left (\frac{b + \frac{2 c}{x}}{2 \sqrt{c} \sqrt{a + \frac{b}{x} + \frac{c}{x^{2}}}} \right )} + x \sqrt{a + \frac{b}{x} + \frac{c}{x^{2}}} + \frac{b \operatorname{atanh}{\left (\frac{2 a + \frac{b}{x}}{2 \sqrt{a} \sqrt{a + \frac{b}{x} + \frac{c}{x^{2}}}} \right )}}{2 \sqrt{a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+c/x**2+b/x)**(1/2),x)

[Out]

-sqrt(c)*atanh((b + 2*c/x)/(2*sqrt(c)*sqrt(a + b/x + c/x**2))) + x*sqrt(a + b/x
+ c/x**2) + b*atanh((2*a + b/x)/(2*sqrt(a)*sqrt(a + b/x + c/x**2)))/(2*sqrt(a))

_______________________________________________________________________________________

Mathematica [A]  time = 0.15374, size = 138, normalized size = 1.31 \[ \frac{x \sqrt{a+\frac{b x+c}{x^2}} \left (b \log \left (2 \sqrt{a} \sqrt{x (a x+b)+c}+2 a x+b\right )+2 \sqrt{a} \left (\sqrt{x (a x+b)+c}-\sqrt{c} \log \left (2 \sqrt{c} \sqrt{x (a x+b)+c}+b x+2 c\right )\right )+2 \sqrt{a} \sqrt{c} \log (x)\right )}{2 \sqrt{a} \sqrt{x (a x+b)+c}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[a + c/x^2 + b/x],x]

[Out]

(x*Sqrt[a + (c + b*x)/x^2]*(2*Sqrt[a]*Sqrt[c]*Log[x] + b*Log[b + 2*a*x + 2*Sqrt[
a]*Sqrt[c + x*(b + a*x)]] + 2*Sqrt[a]*(Sqrt[c + x*(b + a*x)] - Sqrt[c]*Log[2*c +
 b*x + 2*Sqrt[c]*Sqrt[c + x*(b + a*x)]])))/(2*Sqrt[a]*Sqrt[c + x*(b + a*x)])

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 121, normalized size = 1.2 \[{\frac{x}{2}\sqrt{{\frac{a{x}^{2}+bx+c}{{x}^{2}}}} \left ( -2\,\sqrt{c}\ln \left ({\frac{2\,c+bx+2\,\sqrt{c}\sqrt{a{x}^{2}+bx+c}}{x}} \right ) \sqrt{a}+b\ln \left ({\frac{1}{2} \left ( 2\,\sqrt{a{x}^{2}+bx+c}\sqrt{a}+2\,ax+b \right ){\frac{1}{\sqrt{a}}}} \right ) +2\,\sqrt{a{x}^{2}+bx+c}\sqrt{a} \right ){\frac{1}{\sqrt{a{x}^{2}+bx+c}}}{\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+c/x^2+b/x)^(1/2),x)

[Out]

1/2*((a*x^2+b*x+c)/x^2)^(1/2)*x*(-2*c^(1/2)*ln((2*c+b*x+2*c^(1/2)*(a*x^2+b*x+c)^
(1/2))/x)*a^(1/2)+b*ln(1/2*(2*(a*x^2+b*x+c)^(1/2)*a^(1/2)+2*a*x+b)/a^(1/2))+2*(a
*x^2+b*x+c)^(1/2)*a^(1/2))/(a*x^2+b*x+c)^(1/2)/a^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x + c/x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.295776, size = 1, normalized size = 0.01 \[ \left [\frac{4 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}} + \sqrt{a} b \log \left (-{\left (8 \, a^{2} x^{2} + 8 \, a b x + b^{2} + 4 \, a c\right )} \sqrt{a} - 4 \,{\left (2 \, a^{2} x^{2} + a b x\right )} \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}\right ) + 2 \, a \sqrt{c} \log \left (-\frac{8 \, b c x +{\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, c^{2} - 4 \,{\left (b x^{2} + 2 \, c x\right )} \sqrt{c} \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}{x^{2}}\right )}{4 \, a}, \frac{2 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}} - \sqrt{-a} b \arctan \left (\frac{{\left (2 \, a x + b\right )} \sqrt{-a}}{2 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}\right ) + a \sqrt{c} \log \left (-\frac{8 \, b c x +{\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, c^{2} - 4 \,{\left (b x^{2} + 2 \, c x\right )} \sqrt{c} \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}{x^{2}}\right )}{2 \, a}, \frac{4 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}} - 4 \, a \sqrt{-c} \arctan \left (\frac{b x + 2 \, c}{2 \, \sqrt{-c} x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}\right ) + \sqrt{a} b \log \left (-{\left (8 \, a^{2} x^{2} + 8 \, a b x + b^{2} + 4 \, a c\right )} \sqrt{a} - 4 \,{\left (2 \, a^{2} x^{2} + a b x\right )} \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}\right )}{4 \, a}, \frac{2 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}} - \sqrt{-a} b \arctan \left (\frac{{\left (2 \, a x + b\right )} \sqrt{-a}}{2 \, a x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}\right ) - 2 \, a \sqrt{-c} \arctan \left (\frac{b x + 2 \, c}{2 \, \sqrt{-c} x \sqrt{\frac{a x^{2} + b x + c}{x^{2}}}}\right )}{2 \, a}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x + c/x^2),x, algorithm="fricas")

[Out]

[1/4*(4*a*x*sqrt((a*x^2 + b*x + c)/x^2) + sqrt(a)*b*log(-(8*a^2*x^2 + 8*a*b*x +
b^2 + 4*a*c)*sqrt(a) - 4*(2*a^2*x^2 + a*b*x)*sqrt((a*x^2 + b*x + c)/x^2)) + 2*a*
sqrt(c)*log(-(8*b*c*x + (b^2 + 4*a*c)*x^2 + 8*c^2 - 4*(b*x^2 + 2*c*x)*sqrt(c)*sq
rt((a*x^2 + b*x + c)/x^2))/x^2))/a, 1/2*(2*a*x*sqrt((a*x^2 + b*x + c)/x^2) - sqr
t(-a)*b*arctan(1/2*(2*a*x + b)*sqrt(-a)/(a*x*sqrt((a*x^2 + b*x + c)/x^2))) + a*s
qrt(c)*log(-(8*b*c*x + (b^2 + 4*a*c)*x^2 + 8*c^2 - 4*(b*x^2 + 2*c*x)*sqrt(c)*sqr
t((a*x^2 + b*x + c)/x^2))/x^2))/a, 1/4*(4*a*x*sqrt((a*x^2 + b*x + c)/x^2) - 4*a*
sqrt(-c)*arctan(1/2*(b*x + 2*c)/(sqrt(-c)*x*sqrt((a*x^2 + b*x + c)/x^2))) + sqrt
(a)*b*log(-(8*a^2*x^2 + 8*a*b*x + b^2 + 4*a*c)*sqrt(a) - 4*(2*a^2*x^2 + a*b*x)*s
qrt((a*x^2 + b*x + c)/x^2)))/a, 1/2*(2*a*x*sqrt((a*x^2 + b*x + c)/x^2) - sqrt(-a
)*b*arctan(1/2*(2*a*x + b)*sqrt(-a)/(a*x*sqrt((a*x^2 + b*x + c)/x^2))) - 2*a*sqr
t(-c)*arctan(1/2*(b*x + 2*c)/(sqrt(-c)*x*sqrt((a*x^2 + b*x + c)/x^2))))/a]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{a + \frac{b}{x} + \frac{c}{x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+c/x**2+b/x)**(1/2),x)

[Out]

Integral(sqrt(a + b/x + c/x**2), x)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(a + b/x + c/x^2),x, algorithm="giac")

[Out]

Exception raised: TypeError